home *** CD-ROM | disk | FTP | other *** search
/ Cream of the Crop 21 / Cream of the Crop 21 (Terry Blount) (October 1996).iso / doom / relwep12.zip / DEFS.QC < prev    next >
Text File  |  1996-08-17  |  24KB  |  715 lines

  1.  
  2. /*
  3. ==============================================================================
  4.  
  5.             SOURCE FOR GLOBALVARS_T C STRUCTURE
  6.  
  7. ==============================================================================
  8. */
  9.  
  10. //
  11. // system globals
  12. //
  13. entity          self;
  14. entity          other;
  15. entity          world;
  16. float           time;
  17. float           frametime;
  18.  
  19. float           force_retouch;          // force all entities to touch triggers
  20.                                 // next frame.  this is needed because
  21.                                 // non-moving things don't normally scan
  22.                                 // for triggers, and when a trigger is
  23.                                 // created (like a teleport trigger), it
  24.                                 // needs to catch everything.
  25.                                 // decremented each frame, so set to 2
  26.                                 // to guarantee everything is touched
  27. string          mapname;
  28.  
  29. float           deathmatch;
  30. float           coop;
  31. float           teamplay;
  32.  
  33. float           serverflags;            // propagated from level to level, used to
  34.                                 // keep track of completed episodes
  35.  
  36. float           total_secrets;
  37. float           total_monsters;
  38.  
  39. float           found_secrets;          // number of secrets found
  40. float           killed_monsters;        // number of monsters killed
  41.  
  42.  
  43. // spawnparms are used to encode information about clients across server
  44. // level changes
  45. float           parm1, parm2, parm3, parm4, parm5, parm6, parm7, parm8, parm9, parm10, parm11, parm12, parm13, parm14, parm15, parm16;
  46.  
  47. //
  48. // global variables set by built in functions
  49. //      
  50. vector          v_forward, v_up, v_right;       // set by makevectors()
  51.     
  52. // set by traceline / tracebox
  53. float           trace_allsolid;
  54. float           trace_startsolid;
  55. float           trace_fraction;
  56. vector          trace_endpos;
  57. vector          trace_plane_normal;
  58. float           trace_plane_dist;
  59. entity          trace_ent;
  60. float           trace_inopen;
  61. float           trace_inwater;
  62.  
  63. entity          msg_entity;                             // destination of single entity writes
  64.  
  65. //
  66. // required prog functions
  67. //
  68. void()          main;                                           // only for testing
  69.  
  70. void()          StartFrame;
  71.  
  72. void()          PlayerPreThink;
  73. void()          PlayerPostThink;
  74.  
  75. void()          ClientKill;
  76. void()          ClientConnect;
  77. void()          PutClientInServer;              // call after setting the parm1... parms
  78. void()          ClientDisconnect;
  79.  
  80. void()          SetNewParms;                    // called when a client first connects to
  81.                                     // a server. sets parms so they can be
  82.                                     // saved off for restarts
  83.  
  84. void()          SetChangeParms;                 // call to set parms for self so they can
  85.                                     // be saved for a level transition
  86.  
  87.  
  88. //================================================
  89. void            end_sys_globals;                // flag for structure dumping
  90. //================================================
  91.  
  92. /*
  93. ==============================================================================
  94.  
  95.             SOURCE FOR ENTVARS_T C STRUCTURE
  96.  
  97. ==============================================================================
  98. */
  99.  
  100. //
  101. // system fields (*** = do not set in prog code, maintained by C code)
  102. //
  103. .float          modelindex;             // *** model index in the precached list
  104. .vector         absmin, absmax; // *** origin + mins / maxs
  105.  
  106. .float          ltime;                  // local time for entity
  107. .float          movetype;
  108. .float          solid;
  109.  
  110. .vector         origin;                 // ***
  111. .vector         oldorigin;              // ***
  112. .vector         velocity;
  113. .vector         angles;
  114. .vector         avelocity;
  115.  
  116. .vector         punchangle;             // temp angle adjust from damage or recoil
  117.  
  118. .string         classname;              // spawn function
  119. .string         model;
  120. .float          frame;
  121. .float          skin;
  122. .float          effects;
  123.  
  124. .vector         mins, maxs;             // bounding box extents reletive to origin
  125. .vector         size;                   // maxs - mins
  126.  
  127. .void()         touch;
  128. .void()         use;
  129. .void()         think;
  130. .void()         blocked;                // for doors or plats, called when can't push other
  131.  
  132. .float          nextthink;
  133. .entity         groundentity;
  134.  
  135. // stats
  136. .float          health;
  137. .float          frags;
  138. .float          weapon;                 // one of the IT_SHOTGUN, etc flags
  139. .string         weaponmodel;
  140. .float          weaponframe;
  141. .float          currentammo;
  142. .float          ammo_shells, ammo_nails, ammo_rockets, ammo_cells;
  143.  
  144. .float          items;                  // bit flags
  145.  
  146. .float          takedamage;
  147. .entity         chain;
  148. .float          deadflag;
  149.  
  150. .vector         view_ofs;                       // add to origin to get eye point
  151.  
  152.  
  153. .float          button0;                // fire
  154. .float          button1;                // use
  155. .float          button2;                // jump
  156.  
  157. .float          impulse;                // weapon changes
  158.  
  159. .float          fixangle;
  160. .vector         v_angle;                // view / targeting angle for players
  161. .float          idealpitch;             // calculated pitch angle for lookup up slopes
  162.  
  163.  
  164. .string         netname;
  165.  
  166. .entity         enemy;
  167.  
  168. .float          flags;
  169.  
  170. .float          colormap;
  171. .float          team;
  172.  
  173. .float          max_health;             // players maximum health is stored here
  174.  
  175. .float          teleport_time;  // don't back up
  176.  
  177. .float          armortype;              // save this fraction of incoming damage
  178. .float          armorvalue;
  179.  
  180. .float          waterlevel;             // 0 = not in, 1 = feet, 2 = wast, 3 = eyes
  181. .float          watertype;              // a contents value
  182.  
  183. .float          ideal_yaw;
  184. .float          yaw_speed;
  185.  
  186. .entity         aiment;
  187.  
  188. .entity         goalentity;             // a movetarget or an enemy
  189.  
  190. .float          spawnflags;
  191.  
  192. .string         target;
  193. .string         targetname;
  194.  
  195. // damage is accumulated through a frame. and sent as one single
  196. // message, so the super shotgun doesn't generate huge messages
  197. .float          dmg_take;
  198. .float          dmg_save;
  199. .entity         dmg_inflictor;
  200.  
  201. .entity         owner;          // who launched a missile
  202. .vector         movedir;        // mostly for doors, but also used for waterjump
  203.  
  204. .string         message;                // trigger messages
  205.  
  206. .float          sounds;         // either a cd track number or sound number
  207.  
  208. .string         noise, noise1, noise2, noise3;  // contains names of wavs to play
  209.  
  210. //================================================
  211. void            end_sys_fields;                 // flag for structure dumping
  212. //================================================
  213.  
  214. /*
  215. ==============================================================================
  216.  
  217.                 VARS NOT REFERENCED BY C CODE
  218.  
  219. ==============================================================================
  220. */
  221.  
  222.  
  223. //
  224. // constants
  225. //
  226.  
  227. float   FALSE                                   = 0;
  228. float   TRUE                                    = 1;
  229.  
  230. // edict.flags
  231. float   FL_FLY                                  = 1;
  232. float   FL_SWIM                                 = 2;
  233. float   FL_CLIENT                               = 8;    // set for all client edicts
  234. float   FL_INWATER                              = 16;   // for enter / leave water splash
  235. float   FL_MONSTER                              = 32;
  236. float   FL_GODMODE                              = 64;   // player cheat
  237. float   FL_NOTARGET                             = 128;  // player cheat
  238. float   FL_ITEM                                 = 256;  // extra wide size for bonus items
  239. float   FL_ONGROUND                             = 512;  // standing on something
  240. float   FL_PARTIALGROUND                = 1024; // not all corners are valid
  241. float   FL_WATERJUMP                    = 2048; // player jumping out of water
  242. float   FL_JUMPRELEASED                 = 4096; // for jump debouncing
  243.  
  244. // edict.movetype values
  245. float   MOVETYPE_NONE                   = 0;    // never moves
  246. //float MOVETYPE_ANGLENOCLIP    = 1;
  247. //float MOVETYPE_ANGLECLIP              = 2;
  248. float   MOV